Examples of Free intervals in the Analysis profile

For all the examples below, define the interval first, then choose Analyze > Results to calculate the statistics or visualize the results. See Free interval

tip  If you want to define a free interval, to further analyze the events within that interval, choose Nest over a Free interval in the Data profile.

Examples

Example 1: From the track start to when the subject is in a zone for a specific time

Example 2: From the start of a conditioning routine to when 10 rewards are given to the subject

Example 3: Split a track in segments of a specific path length

Example 4: Detect bouts of a behavior

Example 5: From the track start to when external (physiological) data reach a specific value

Example 6: Filter the instances of a behavior longer than a certain time

 

Example 1: From the track start to when the subject is in a zone for a specific time

Aim

This Free interval can be used, for example:

Exploratory behavior. Calculate the time that the subject takes to explore the novel object for at least 30 s (Cumulative duration).

Learning. Calculate the time me that the animal takes to stay in a zone for 30 s uninterrupted (Current duration).

Solution

Define a Free interval with:

Start criterion: Track start

Stop criterion: Dependent variable In zone. The Statistic depends on the type of question you want to answer.

In the Novel object test, you want to stop the interval when the subject has explored the object for a total of 30 s. Choose then Cumulative duration.

In the learning example, you want to stop the interval when the subject enters a zone and stays for 30 s without exiting. Choose then Current duration.

Example 2: From the start of a conditioning routine to when 10 rewards are given to the subject

Aim

In a conditioning experiment, the subject has to stay in a specific zone to obtain a food pellet. The action-reward sequence is repeated a number of times in a subrule. The researcher wants to know how long it took the subject to get 10 rewards.

Solution

Create a Free interval with:

Start criterion: Trial Control. Element: Subrule. Event: becomes active.

Stop criterion: Hardware. Device type: Pellet dispenser. Select signal: Number of drops >=10. The option Cumulative is selected.

Example 3: Split a track in segments of a specific path length

Aim

Suppose you want to split your tracks in segments of a specific distance moved by the subject, for example 1 m, and you want to calculate the duration of each segment.

Solution

Create a Free interval with:

Start criterion: Dependent variable Distance Moved. Statistic: Current ≥ 0 cm.

Stop criterion: Dependent variable Distance Moved. Statistic: Total ≥ 100 cm.

To calculate the duration of individual instances, select Calculate statistics per interval and enter a number that exceeds the maximum number of interval per track.

Below: Plot 1: Per-sample distance moved. Plots 2: Free interval that runs from Current Distance moved >=0 to Total Distance moved >=100 cm. Note that the faster the animal (i.e. the longer the per-sample distance moved), the shorter the resulting interval.

inset_7701032.jpg 

Example 4: Detect bouts of a behavior

Aim

Calculate the number and duration of bouts of a behavior, for example Movement or Activity. The single instances of Movement being part of a bout may be separated by up to time tmax. In the example below, instances 1 to 5 are grouped in a bout.

inset_6001033.jpg 

Solution

Create a free interval with:

Start criterion: Dependent variable Movement with state Moving. Statistic: Current.

Stop criterion: Dependent variable Movement with state Not moving. Statistic: Current Duration ≥ 5 s (tmax). This ensures that the interval ends when the animal has not moved for five seconds without interruption.

In the Trial Statistics tab of the same window, select Mean if you want to know the average duration of a bout.

inset_10001034.jpg 

notes

Because each free interval also includes tmax (see the length of the orange bars in the figure above, which represent the free intervals), you have to subtract that time to obtain the true average duration.

If the event which specifies the end of a bout (in this example, Not moving for at least 5 seconds) is never found, the result for that trial is that there is no bout at all. The result is one long bout if you de-select the option Ignore last interval if incomplete.

For the same reason as described above, if the Stop criterion is not met, the last bout of a trial is not detected. For example, when the time between the start of Not moving and the end of the trial is less than tmax. You can have the last bout detected by selecting the option Ignore last interval if incomplete, but the duration of this bout is truncated.

Example 5: From the track start to when external (physiological) data reach a specific value

Aim

To calculate the time that it takes for a physiological variable (e.g. heart rate) to reach a specific value.

Prerequisite

The physiological variable has been imported in the trial. See External Data

Solution

Create a Free interval with:

Start criterion: Track start

Stop criterion: Dependent variable Hear rate. The Statistic chosen is Current.

If necessary, click Settings and choose how to re-sample the variable from the original signal. See External data (resampled)

inset_9101035.jpg 

The result is shown in the first plot below, together with the plot of Heart rate. Choose Analysis > Results > Statistics and Charts to obtain the length of the free interval.

inset_9201036.jpg 

tip   If you want to analyze the time between two values of external data, for example from Heart rate = 300 to Heart rate = 400, then in the Analysis profile choose External data (state) instead, not Free interval.

Example 6: Filter the instances of a behavior longer than a certain time

Aim

In this example we want to filter the behavioral states (e.g. Not Moving). We want to remove the instances of Not Moving that last less than 1 second.

Solution

1.In the Analysis profile create a free interval with Movement as a criterion.  

Start Criterion: Select Dependent variable.

Start at: Enter there the minimum time duration. In this example, 1 s.

Select variable: choose the behavior. In this example, Movement.

Statistic: Current Duration.

Settings: Define the behavior state. In this example, Not Moving is chosen, based on thresholds Start velocity 2.0 cm/s and Stop velocity 1.5 cm/s.

Stop criterion: The main difference from the Start criterion is that you must select the opposite of the behavior above. In this example, under Settings, Moving is selected with the same thresholds as above, and the Statistic is Current; then select true. Next to Stop at, leave 0.0 selected.

inset_14701037.jpg 

2.In the Integrated Visualization you can check if the free interval works as expected.

The first plot shows the typical Movement variable, with the two states Moving and Not Moving).

The second plot is that of the free interval defined above. It plots the instances of Not Moving longer than 1 s, while ignoring the shorter instances.

inset_15201038.jpg 

3.Calculate the statistics of the free interval.

tip  In the interval definition, select Calculate results for interval 1 to ... if you want results for each instance of the filtered behavior. On the Trial Statistics tab, choose the statistic that you need:

Choose Frequency to know how many instances of the filtered behavior occur.

Choose Latency to first to know at what time that behavior occurs, for each instance.

See also

Free interval based on a dependent variable

Free interval based on a Trial Control event

Free interval based on hardware

Free interval based on multiple subjects

Analysis advisor